package com.powernode.myspring.bean.reflect;

import java.lang.reflect.Method;

public class Test3 {
    public static void main(String[] args) throws Exception {
        // 获取类
        Class<?> clazz = Class.forName("com.powernode.myspring.bean.reflect.SomeService");
        // 获取方法
        Method doSomeMethod = clazz.getDeclaredMethod("doSome");
        // 调用方法
        Object obj = clazz.newInstance();
        doSomeMethod.invoke(obj);

    }
}
